package top.zackyoung.demo.controller;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @author: ZackYoung
 * @time: 2020/9/17
 */
// 扫描
@Component
// 将配置文件的值赋值到此类里面
@ConfigurationProperties(prefix = "person")
public class Person {
    private String name;
    private int age;
    private Boolean inBoss;
    private Date birth;
    private Map<String ,String > maps;
    // 第一种list
    private List<String > list;
    // 第二种list
    private List<String > list2;

    public List<String> getList2() {
        return list2;
    }

    public void setList2(List<String> list2) {
        this.list2 = list2;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public Boolean getInBoss() {
        return inBoss;
    }

    public void setInBoss(Boolean inBoss) {
        this.inBoss = inBoss;
    }

    public Date getBirth() {
        return birth;
    }

    public void setBirth(Date birth) {
        this.birth = birth;
    }

    public Map<String, String> getMaps() {
        return maps;
    }

    public void setMaps(Map<String, String> maps) {
        this.maps = maps;
    }

    public List<String> getList() {
        return list;
    }

    public void setList(List<String> list) {
        this.list = list;
    }

    @Override
    public String toString() {
        return "Person{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", inBoss=" + inBoss +
                ", birth=" + birth +
                ", map=" + maps +
                ", list=" + list +
                '}';
    }
}
